using System.Windows;
using WpfClient.Application.ViewModels;

namespace WpfClient.Views
{
    /// <summary>
    /// UserManagementWindow.xaml 的交互逻辑
    /// </summary>
    public partial class UserManagementWindow : Window
    {
        public UserManagementWindow(UserManagementViewModel viewModel)
        {
            InitializeComponent();
            DataContext = viewModel;
            
            // 窗口加载时自动加载用户数据
            Loaded += async (s, e) => await viewModel.LoadUsersCommand.ExecuteAsync(null);
        }
    }
}